package com.lzq.shiro.config;

import org.apache.shiro.cache.AbstractCacheManager;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.springframework.data.redis.core.RedisTemplate;
@SuppressWarnings("rawtypes")
public class ShiroRedisCacheManager extends AbstractCacheManager{
	
	private RedisTemplate redisTemplate;

	public ShiroRedisCacheManager(RedisTemplate redisTemplate) {
		this.redisTemplate = redisTemplate;
	}
	
	@Override
	protected Cache<?,?> createCache(String name) throws CacheException {
		return new ShiroRedisCache(redisTemplate);
	}
	
	
	
	
}
